import Vue from 'vue';
import VueRouter from "vue-router";

import home from '@/view/home/home.vue';
import index from '@/view/index/index.vue';
import personalinfo from '@/view/personal/personalinfo/personalinfo.vue';
import userinfo from '@/view/personal/personalinfo/userinfo/userinfo.vue';
import password from '@/view/personal/personalinfo/password/password.vue';
import enterpriseinfo from '@/view/personal/enterpriseinfo/enterpriseinfo.vue';
import allorder from '@/view/personal/order/allorder/allorder.vue';
import orderdetail from '@/view/personal/order/orderdetail/orderdetail.vue';
import waitforauditorder from '@/view/personal/order/waitforauditorder/waitforauditorder.vue';
import waitforpayorder from '@/view/personal/order/waitforpayorder/waitforpayorder.vue';
import refundorder from '@/view/personal/order/refundorder/refundorder.vue';
import waitfordeliveryorder from '@/view/personal/order/waitfordeliveryorder/waitfordeliveryorder.vue';
import waitforreceiptorder from '@/view/personal/order/waitforreceiptorder/waitforreceiptorder.vue';
import untreatedorder from '@/view/personal/order/untreatedorder/untreatedorder.vue';
import allbackorder from '@/view/personal/backorder/all/all.vue';
import waitforprocessing from '@/view/personal/backorder/waitforprocessing/waitforprocessing.vue';
import notcompleted from '@/view/personal/backorder/notcompleted/notcompleted.vue';
import completed from '@/view/personal/backorder/completed/completed.vue';
import cancelbackorder from '@/view/personal/backorder/cancel/cancel.vue';
import productcategory from '@/view/product/productcategory/productcategory.vue';
import productmanage from '@/view/product/productmanage/productmanage.vue';
import productmanageadd from '@/view/product/productmanage/add/add.vue';
import productmanageedit from '@/view/product/productmanage/edit/edit.vue';
import productmanagedetail from '@/view/product/productmanage/detail/detail.vue';
import productattribute from '@/view/product/productattribute/productattribute.vue';
import productattributeadd from '@/view/product/productattribute/add/add.vue';
import productattributeedit from '@/view/product/productattribute/edit/edit.vue';
import productattributedetail from '@/view/product/productattribute/detail/detail.vue';
import productparam from '@/view/product/productparam/productparam.vue';
import productparamadd from '@/view/product/productparam/add/add.vue';
import productparamedit from '@/view/product/productparam/edit/edit.vue';
import productparamdetail from '@/view/product/productparam/detail/detail.vue';
import allotorderrule from '@/view/product/shoppingmallconfig/allotorderrule/allotorderrule.vue';
import allotorderruleadd from '@/view/product/shoppingmallconfig/allotorderrule/add/add.vue';
import allotorderruleedit from '@/view/product/shoppingmallconfig/allotorderrule/edit/edit.vue';
import allotorderruledetail from '@/view/product/shoppingmallconfig/allotorderrule/detail/detail.vue';
import promotionplan from '@/view/product/shoppingmallconfig/promotionplan/promotionplan.vue';
import promotionplanadd from '@/view/product/shoppingmallconfig/promotionplan/add/add.vue';

Vue.use(VueRouter);
const router = new VueRouter({
	routes: [
		{path: '/', redirect: '/home'},
		{path: '/home',name: 'home', component: home,
			children: [
	            { path: 'index', name: 'index', component: index},
	            { path: 'personalinfo', name: 'personalinfo', component: personalinfo,
	        	 children: [
	        	 	{ path: 'userinfo', name: 'userinfo', component: userinfo},
	        	 	{ path: 'password', name: 'password', component: password}
	        	 ]},
        	 	{ path: 'enterpriseinfo', name: 'enterpriseinfo', component: enterpriseinfo},
        	 	{ path: 'allorder', name: 'allorder', component: allorder},
        	 	{ path: 'orderdetail', name: 'orderdetail', component: orderdetail},
        	 	{ path: 'waitforauditorder', name: 'waitforauditorder', component: waitforauditorder},
        	 	{ path: 'waitforpayorder', name: 'waitforpayorder', component: waitforpayorder},
        	 	{ path: 'refundorder', name: 'refundorder', component: refundorder},
        	 	{ path: 'waitfordeliveryorder', name: 'waitfordeliveryorder', component: waitfordeliveryorder},
        	 	{ path: 'waitforreceiptorder', name: 'waitforreceiptorder', component: waitforreceiptorder},
        	 	{ path: 'untreatedorder', name: 'untreatedorder', component: untreatedorder},
        	 	{ path: 'allbackorder', name: 'allbackorder', component: allbackorder},
        	 	{ path: 'waitforprocessing', name: 'waitforprocessing', component: waitforprocessing},
        	 	{ path: 'notcompleted', name: 'notcompleted', component: notcompleted},
        	 	{ path: 'completed', name: 'completed', component: completed},
        	 	{ path: 'cancelbackorder', name: 'cancelbackorder', component: cancelbackorder},
        	 	{ path: 'productcategory', name: 'productcategory', component: productcategory},
        	 	{ path: 'productmanage', name: 'productmanage', component: productmanage},
        	 	{ path: 'productmanageadd', name: 'productmanageadd', component: productmanageadd},
        	 	{ path: 'productmanageedit', name: 'productmanageedit', component: productmanageedit},
        	 	{ path: 'productmanagedetail', name: 'productmanagedetail', component: productmanagedetail},
        	 	{ path: 'productattribute', name: 'productattribute', component: productattribute},
        	 	{ path: 'productattributeadd', name: 'productattributeadd', component: productattributeadd},
        	 	{ path: 'productattributeedit', name: 'productattributeedit', component: productattributeedit},
        	 	{ path: 'productattributedetail', name: 'productattributedetail', component: productattributedetail},
        	 	{ path: 'productparam', name: 'productparam', component: productparam},
        	 	{ path: 'productparamadd', name: 'productparamadd', component: productparamadd},
        	 	{ path: 'productparamedit', name: 'productparamedit', component: productparamedit},
        	 	{ path: 'productparamdetail', name: 'productparamdetail', component: productparamdetail},
        	 	{ path: 'allotorderrule', name: 'allotorderrule', component: allotorderrule},
        	 	{ path: 'allotorderruleadd', name: 'allotorderruleadd', component: allotorderruleadd},
        	 	{ path: 'allotorderruleedit', name: 'allotorderruleedit', component: allotorderruleedit},
        	 	{ path: 'allotorderruledetail', name: 'allotorderruledetail', component: allotorderruledetail},
        	 	{ path: 'promotionplan', name: 'promotionplan', component: promotionplan},
        	 	{ path: 'promotionplanadd', name: 'promotionplanadd', component: promotionplanadd},
           	]	
		},		
	]
})

export default router